'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;
    router.get('/', controller.home.index);
    //注册
    router.post('/api/registry',controller.user.registry);

    //登录
    router.post('/api/login',controller.user.login);

    //上传图片
    router.post('/api/upload',controller.music.upload);

    //添加歌曲
    router.post('/api/addmusic',controller.music.addmusic);

    //获取歌曲
    router.get('/api/querymusic',controller.music.querymusic);

    //修改歌曲
    router.post('/api/updatemusic',controller.music.updatemusic);

    //删除歌曲
    router.delete('/api/deletemusic',controller.music.deletemusic);
};
